<?php

namespace App\Vilidate\delivery;

/**
 * user控制器下的验证规则类
 */
class PlayletController
{
    public $index = ['rule'=>[], 'msg'=>[]];

    public $episodesIndex = ['rule'=>[], 'msg'=>[]];

    public $batchUpload = [
        'rule'=>[
            'videos' => 'required|array',
            'videoType' => 'required',
        ],
        'msg'=>[
            'videoType.required' => '视频类型不能为空',
            'videos.required' => '视频不能为空',
            'videos.array' => '视频应为数组',
        ]
    ];

    public $view = ['rule'=>[], 'msg'=>[]];

    public $delete = ['rule'=>[], 'msg'=>[]];
    public $auditDrama = ['rule'=>[], 'msg'=>[]];

    public $episodesList = ['rule'=>[], 'msg'=>[]];
    public $episodesCreate = [
        'rule'=>[
            'playlet_number' => 'required',
            'playlet_number_name' => 'required|string',
            'cover' => 'required|url',
            'play_url' => 'required|url',
        ],
        'msg'=>[
            'playlet_number.required' => '集数不能为空',
            'playlet_number_name.string' => '剧集名称为字符串',
            'playlet_number_name.required' => '剧集名称不能为空',
            'cover.required' => '剧集封面图不能为空',
            'cover.url' => '剧集封面图应该为url',
            'play_url.required' => '剧集视频不能为空',
            'play_url.url' => '剧集视频应该为url',
        ]
    ];
    public $episodesUpdate = [
        'rule'=>[
            'playlet_number' => 'required',
            'playlet_number_name' => 'required|string',
            'cover' => 'required|url',
            'play_url' => 'required|url',
        ],
        'msg'=>[
            'playlet_number.required' => '集数不能为空',
            'playlet_number_name.string' => '剧集名称为字符串',
            'playlet_number_name.required' => '剧集名称不能为空',
            'cover.required' => '剧集封面图不能为空',
            'cover.url' => '剧集封面图应该为url',
            'play_url.required' => '剧集视频不能为空',
            'play_url.url' => '剧集视频应该为url',
        ]
    ];

    public $create = [
        'rule'=>[
            'name' => 'required|string',
            'introduction' => 'required|string',
            'cover' => 'required|string',
            'status' => 'required',
        ],
        'msg'=>[
            'name.required' => '名称不能为空',
            'introduction.string' => '剧集简介为字符串',
            'introduction.required' => '剧集简介不能为空',
            'cover.required' => '剧集头像不能为空',
            'status.required' => '状态不能为空',
        ]
    ];

    public $update = [
        'rule'=>[
            'name' => 'required|string',
            'introduction' => 'required|string',
            'cover' => 'required|string',
            'status' => 'required',
//            'producer' => 'required|string',
//            'registration_number' => 'required|string',
//            'registration_number_url' => 'required|url',
        ],
        'msg'=>[
            'name.required' => '名称不能为空',
            'introduction.string' => '剧集简介为字符串',
            'introduction.required' => '剧集简介不能为空',
            'cover.required' => '剧集头像不能为空',
            'status.required' => '状态不能为空',
//            'producer.required' => '制作方不能为空',
//            'registration_number.required' => '剧目备案号不能为空',
//            'registration_number_url.required' => '剧目播放授权材料图片不能为空',
        ]
    ];
}